/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.pbs.pojos;

import br.com.pbs.interfaces.Bean;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author Luiz Segundo
 */
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public class Pessoa implements Bean, Serializable{

        @Id
        @GeneratedValue(strategy=GenerationType.AUTO)
        private long id;

        @Column
        protected String nome;
        @Column
        protected String stps;
        @OneToMany
        protected List<Email> emails;
        @OneToOne
        protected Endereco enderecos;

        public long getId() {
                return id;
        }

        public void setId(long id) {
                this.id = id;
        }

        public String getNome() {
                return nome;
        }

        public void setNome(String nome) {
                this.nome = nome;
        }

        public String getStps() {
                return stps;
        }

        public void setStps(String stps) {
                this.stps = stps;
        }

        public List<Email> getEmails() {
                return emails;
        }

        public void setEmails(List<Email> emails) {
                this.emails = emails;
        }

        public Endereco getEnderecos() {
                return enderecos;
        }

        public void setEnderecos(Endereco enderecos) {
                this.enderecos = enderecos;
        }      
        
}